package com.kanshu.client.ui.activity;

import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;


import com.kanshu.client.R;
import com.kanshu.client.model.menu.MenuItem;
import com.kanshu.client.ui.activity.ipc.IPCIndexActivity;
import com.kanshu.client.ui.base.BaseMenuActivity;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends BaseMenuActivity {


    @Override
    protected String provideBarTitle() {
        return "测试客户端";
    }

    public static final String TAG = "MainActivity";

    @Override
    protected List<? extends MenuItem> provideMenuData() {
        List<MenuItem> menuItems = new ArrayList<>();
        menuItems.add(0, new MenuItem("IPC", R.color.brown_300));//实例应用
        return menuItems;
    }

    @Override
    protected void init() {
        super.init();
    }

    @Override
    public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
        Intent intent = new Intent();
        switch (position) {
            case 0://基础
                intent.setClass(this, IPCIndexActivity.class);
                break;
            default:
                break;

        }

        startActivity(intent);
    }
}
